#include<iostream>
using namespace std;

class Point{

    private:
        int x,y;
    
    public:
        void Setxy(int x,int y){
            this->x=x;
            this->y=y;
        }

        void Move(int x, int y){
            this->x=this->x+x;
            this->y=this->y+y;
        }

        void Display(){
            cout<<"x:"<<Getx()<<",y:"<<Gety()<<endl;
        }
    
        int Getx(){
            return x;
        }
    
        int Gety(){
            return y;
        }
};

void print(Point &a){
    a.Display();
}
void print1(Point *a){
    a->Display();
}

int main(){

    Point p = Point();
    p.Setxy(123,333);
    //p.Display();
    print1(&p);

    Point &a = p;
    a.Setxy(1,2);
    print(p);

    Point *b = &p;
    b->Move(44,55);
    print1(b);
    print(p);

    return 0;
}

